<div data-extend-template="components/views/bst-modal.html">
  <h4 data-block="modal-header" translate>Content Host Bulk Content</h4>

  <div data-block="modal-body">
    <h4 translate>Assign Release Version</h4>

    <div class="row">
      <div class="col-sm-12">
        <div bst-global-notification></div>
      </div>
    </div>

    <div bst-alert="info" ng-show="showConfirm">
      <span translate>
        Are you sure you want to set the Release Version the {{ table.numSelected }} content host(s) selected to {{ selected.release }}?. This action will affect only those Content Hosts that belong to the appropriate Content View and Lifecycle Environment containining that release version.
      </span>
      <div>
        <button type="button" class="btn btn-default" ng-click="showConfirm = false; performAction()" translate>Yes</button>
        <button type="button" class="btn btn-default" ng-click="showConfirm = false;" translate>No</button>
      </div>
    </div>

    <form name="contentHostContentForm" class="form" ng-hide="content.workingMode">
      <div>
        <label translate>Release Version:</label>

        <i ng-show="fetchingReleases" class="fa fa-spinner inline-icon fa-spin"></i>
        <select ng-hide="fetchingReleases || releases.length === 0"
                type="select"
                ng-options="release for release in releases"
                ng-model="selected.release">
        </select>

        <p class="page-error" ng-show="!fetchingReleases && releases.length === 0" translate>
          No releases exist in the Library.
        </p>

      </div>

      <button class="btn btn-default"
              type="button"
              ng-hide="denied('edit_hosts')"
              ng-click="showConfirm = true;"
              ng-disabled="disableAssignButton(showConfirm)">
        <span translate>Assign</span>
      </button>

    </form>
  </div>

  <div data-block="modal-footer">
    <button type="button" class="btn btn-primary" ng-click="ok()" translate>
      Done
    </button>
  </div>
</div>